package com.interview.ujiuye1;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.time.LocalDateTime;

/**
 * Copyright (C), 2018-2020
 * FileName: Demo3
 * Author:   kongfanyu
 * Date:     2020/9/14 11:11
 */
public class Demo3 {
    public static void main(String[] args) {
        LocalDateTime today = LocalDateTime.now();
        LocalDateTime yesterday = today.minusDays(1);
        System.out.println(yesterday);

        try {
            //受检查异常，编译器期异常
            FileOutputStream fos = new FileOutputStream("xx");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        int [] data = new int [10];
        System.out.println(data[1000]);//运行期异常
        String name = null;
        System.out.println(name.toString());
    }
}
